{% extends "bootstrap/base.html" %}
{% import "tools.html" as tools %}

{% block nav %}
{{ tools.nav }}
{% endblock %}

{% block content %}
<h1>
    班级列表
</h1>
<div class="content">
    <table class="table">
        <tr>
            <th>Id</th>
            <th>Name</th>
            {% if Flag %}
            <th>Add</th>
            {% endif %}
        </tr>
        {% for i in R %}
        <tr>
            <th>
                {{ i.Id }}
            </th>
            <th>
                <a href="{{ url_for('TCview.user',Id = current_user.Id) }}">
                {{ i.Name }}
                </a>
            </th>
            {% if Flag %}
            <th>
                <button type="button" class="btn btn-link">
                    <a href="{{ url_for('TCview.add_room',User_Id=current_user.Id,Room_Id=i.Id)}}">
                        Add this Room
                    </a>
                </button>
            </th>
            {% endif %}
        </tr>
        {% endfor %}
    </table>
</div>
{% endblock %}